import "package:ct_pa_majordomo/utils/request.dart";
import "package:dio/dio.dart";

class OnlinePayApi {

  /* 新增线上支付申请信息 */
  Future<Map> save(data) async {
    Response response = await request.post(
      "apartment/payment/account",
      data: data,
    );
    return response.data ?? {};
  }

  /* 保存草稿 */
  Future<Map> draft(data) async {
    Response response = await request.post(
      "apartment/payment/account/draft",
      data: data,
    );
    return response.data ?? {};
  }

  /* 获取线上支付申请信息 */
  Future<Map> getInfo() async {
    Response response = await request.get(
      "apartment/payment/account/info",
    );
    return response.data ?? {};
  }
} 

OnlinePayApi onlinePayApi = OnlinePayApi();